import { createApp } from 'vue'
// pinia
import { createPinia } from 'pinia'
// 路由
import router from './router'
// App根组件
import App from './App.vue'
// 全局样式
import '@/styles/index.scss'
// 自定义插件
import { customDirective } from '@/plugins/directive'
// 自定义插件 - 注册全局组件
import registerComponent from '@/plugins/registerComponent'
// pinia持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

const app = createApp(App)

app.use(pinia)
app.use(router)
app.use(customDirective)
app.use(registerComponent)

app.mount('#app')
